(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



Needs["MathOO`"]
NewClass[dict];
dict.$init$[self_,items___]:=Module[{$attr$},
self["$dict"]=$attr$;
If[items=!=Null,Scan[($attr$[#[[1]]]=#[[2]])&,{items}]];
];
dict.put[self_,key_,value_]:=(self["$dict"][key]=value;self)
dict.get[self_,key_,default_:Null]:=If[hasAttr[self["$dict"],key],self["$dict"][key],default];
dict.values[self_]:=DownValues[Evaluate[self["$dict"]],Sort->False][[All,2]]
dict.keys[self_]:=DownValues[Evaluate[self["$dict"]],Sort->False][[All,1,1,1]]
dict.items[self_]:={#[[1,1,1]],#[[2]]}&/@DownValues[Evaluate[self["$dict"]], Sort->False]
dict.addList[self_,x__]:=Block[{$d=self["$dict"]},Scan[($d[#[[1]]]=#[[2]])&,{x}];self]
dict.update[self_,dict_]:=Block[{$d=self["$dict"],
items={#[[1,1,1]],#[[2]]}&/@DownValues[Evaluate[dict["$dict"]], Sort->False]},
Scan[($d[#[[1]]]=#[[2]])&,items];
self]
dict.clear[self_]:=(Clear[Evaluate[self["$dict"]]];self)
dict.hasKey[self_,key_]:=hasAttr[self["$dict"],key];
dict.length[self_]:=Length[DownValues[Evaluate[self["$dict"]]]]
